//
//  BufferQueue.h
//  BufferQueue
//
//  Created by yh on 2018/4/12.
//  Copyright © 2018年 yh. All rights reserved.
//

#ifndef BufferQueue_h
#define BufferQueue_h

#define BUFFER_SIZE 16
#include <stdio.h>

struct Queue {
    unsigned char buffer[BUFFER_SIZE]; //缓冲区
    unsigned char head; //队首
    unsigned char tail; //队尾
    unsigned char dat_lenght; //缓冲区数据长度
};
extern struct Queue *sendQueue;

void q_put(struct Queue *queue,unsigned char dat);

unsigned char q_get(struct Queue *queue);

#endif /* BufferQueue_h */
